.global main

.section .data
.section .rodata
.LC0:
	.string "%d\n"

.text
main:
	pushl %ebp
	movl %esp, %ebp
	pushl %ebx
	pushl %edx

	subl $8, %esp
	// a = 1
	movl $1, -4(%ebp)
	// b = 1
	movl $1, -8(%ebp)
	jmp .LCmain_400

.LCmain_500:
	cmpl $9, -8(%ebp)
	jg .LCmain_600

	movl $0, %edx
	movl -8(%ebp), %eax
	movl $3, %ebx	
	divl %ebx
	cmp $1, %edx
	jne .LCmain_800
	addl $3, -8(%ebp)
	jmp .LCmain_700
	
.LCmain_800:
	pushl -4(%ebp)
	pushl $.LC0
	call printf
	addl $8, %esp

.LCmain_700:
	incl -4(%ebp)

.LCmain_400:
	cmpl $101, -4(%ebp)
	jl .LCmain_500

.LCmain_600:
	popl %edx
	popl %ebx
	movl $0, %eax
	leave
	ret
